using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Speedball2 {
  public class MatchParam {
    public GameTypeEnum gameType;
    //public Palette palette;
    public Player [] playersTeam1;
    public Player [] playersTeam2;
    public Attributes [] attributesTeam1;
    public Attributes [] attributesTeam2;
    public Attributes attributesTemp;
    public Attributes [] attributesMarket;
    public Person [] personsTeam1;
    public Person [] personsTeam2;
    public Person personTemp;
    public int creditsTeam1;
    public int creditsTeam2;

    public int coinsCredits;
    public int creditsEarnablePerMatch;
    public int minCreditsEarnable;
    public int maxCreditsEarnableTeam1;
    public int maxCreditsEarnableTeam2;

    public int legDuration;
    public int initialDirTeam1;
    public bool isComputerPlayer1;
    public bool isComputerPlayer2;
    public Team team1;
    public Team team2;

    public void Check () {
      //if (palette == null)
      //  throw new Exception ();
      if (playersTeam1 == null)
        throw new Exception ();
      if (playersTeam2 == null)
        throw new Exception ();
      if (attributesTeam1 == null)
        throw new Exception ();
      if (attributesTeam2 == null)
        throw new Exception ();
      if (attributesTemp == null)
        throw new Exception ();
      if (attributesMarket == null)
        throw new Exception ();
      if (creditsTeam1 == -1)
        throw new Exception ();
      if (creditsTeam2 == -1)
        throw new Exception ();

      if (coinsCredits == -1)
        throw new Exception ();
      if (creditsEarnablePerMatch == -1)
        throw new Exception ();
      if (minCreditsEarnable == -1)
        throw new Exception ();
      if (maxCreditsEarnableTeam1 == -1)
        throw new Exception ();
      if (maxCreditsEarnableTeam2 == -1)
        throw new Exception ();

      if (legDuration == -1)
        throw new Exception ();
      if (initialDirTeam1 == -1)
        throw new Exception ();
      if (team1 == null)
        throw new Exception ();
      if (team2 == null)
        throw new Exception ();
    }
  }
}
